#-*- coding:utf-8 -*-
import json
dic = [("hehe",234), ("fuck",23)]


def get_json(dic):
    """生成前端所要的json数据"""
    json_object = {"styleType":"title"}
    json_object["data"] = []
    for k,v in dic:
        json_object["data"].append({"word":k,"frq":v,"otherMsg":"tipMessege"});
    return json.dumps(json_object)

def main():
    print get_json(dic)

if __name__ == '__main__':
    main()